package com.example.config;

import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: tobed
 * @date: 2022/11/11
 * @time: 13:25
 */
@Configuration
public class QueueBean {

    public static final String INSERT_QUEUE_NAME  = "INSERT_QUEUE_NAME";

    public static final String Update_QUEUE_NAME  = "Update_QUEUE_NAME";

    public static final String Delete_QUEUE_NAME  = "Delete_QUEUE_NAME";

    @Bean
    Queue INSERT_QUEUE_NAME(){
        return QueueBuilder.durable(QueueBean.INSERT_QUEUE_NAME).build();
    }

    @Bean
    Queue Update_QUEUE_NAME(){
        return QueueBuilder.durable(QueueBean.Update_QUEUE_NAME).build();
    }

    @Bean
    Queue Delete_QUEUE_NAME(){
        return QueueBuilder.durable(QueueBean.Delete_QUEUE_NAME).build();
    }

}
